<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<%@include file="/WEB-INF/pages/common/taglibs.jsp"%>
<title>用户管理</title>
</head>
<script type="text/javascript">
$(function(){
	$('#org').tree({
		url: '${ctx}org/treeOrg.htm?pid=',
		onBeforeExpand:function(node,param){
			  $('#org').tree('options').url = "${ctx}org/treeOrg.htm?pid=" + node.id;// change the url  
			  //param.myattr = 'test'; // or change request parameter
			  },  
			  onClick:function(node){  
			  alert(node.id); 
			  }   
		
	});
});

function loadUser(orgId){
	$('#tt').datagrid({
		url: 'datagrid_data2.json',
		title: 'DataGrid - ContextMenu',
		width: 700,
		height: 'auto',
		fitColumns: true,
		columns:[[
			{field:'itemid',title:'Item ID',width:80},
			{field:'productid',title:'Product ID',width:120},
			{field:'listprice',title:'List Price',width:80,align:'right'},
			{field:'unitcost',title:'Unit Cost',width:80,align:'right'},
			{field:'attr1',title:'Attribute',width:250},
			{field:'status',title:'Status',width:60,align:'center'}
		]],
		onHeaderContextMenu: function(e, field){
			e.preventDefault();
			if (!$('#tmenu').length){
				createColumnMenu();
			}
			$('#tmenu').menu('show', {
				left:e.pageX,
				top:e.pageY
			});
		}
	});
}
</script>
<body>
	<div style="width: 1024px;">
		<!-- 机构 -->
		<div style="width:250px; float:left;">
			<div class="easyui-panel" style="width:245px;height:460px;padding:2px;"
				title="机构"  collapsible="false" minimizable="false" maximizable=false closable="false">
				<div id="org"></div>
			</div>
		</div> 
		
		<!-- 用户列表 -->
		<div style="width:250px; float:left;">
			<div  class="easyui-panel" style="width:245px;height:460px;padding:2px;"
				title="用户列表"  collapsible="false" minimizable="false" maximizable=false closable="false">
				<div id="user"></div>
			</div>
		</div> 
		<!-- 用户详情-->
		<div style="width:524px; float:left;">
			<div  class="easyui-panel" style="width:524px;height:460px;padding:2px;"
				title="用户详情"  collapsible="false" minimizable="false" maximizable=false closable="false">
				<div id="org"></div>
			</div>
		</div>  
	</div>
</body>
</html>